<style>
    .pageFormContent dd {
    display: block;
    float: none;
    line-height: 21px;
    width: 450px;
}
</style>
<form id="pagerForm" action="{:U($module_name.'/'.$action_name)}">
    <input type="hidden" name="pageNum" value="{$pageNum}" />
    <input type="hidden" name="numPerPage" value="{$numPerPage}" />
    <input type="hidden" name="id" value="{$_REQUEST ['id']}" />
</form>
<div class="pageContent">
    <table class="table" layoutH="200" targetType="dialog" width="100%">
        <thead>
            <tr>
                <th>ID</th>
                <th>商品类型</th>
                <th>比例</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
        <volist name="list" id="vo">
            <tr>
                <td>{$vo['id']}</td>
                <td>{$pro_type[$vo['mname']]}</td>
                <td>{$vo['profit']}</td>
                <td><a title="删除" target="ajaxTodo" href="{:U('Agent/profitdel',array('id'=>$vo['id'],'agentid'=>$vo['agent_id']))}">删除</a></td>
            </tr>
        </volist>
        </tbody>
    </table>

    <div class="panelBar">
        <div class="pages">
            <span>显示</span>
        <select class="combox" name="numPerPage" onchange="navTabPageBreak({targetType:dialog,numPerPage:this.value})">
            <option value="5" {if $numPerPage==5}selected="selected"{/if}>5</option>
            <option value="10" {if $numPerPage==10}selected="selected"{/if}>10</option>
            <option value="20" {if $numPerPage==20}selected="selected"{/if}>20</option>
        </select>
        <span>条，共{$totalCount}条</span>
        </div>
        <div class="pagination" targetType="dialog" totalCount="{$totalCount}" numPerPage="{$numPerPage}" pageNumShown="10" currentPage="{$pageNum}"></div>
    </div>
</div>
<div class="pageContent">
    <form method="post" action="{:U('Agent/profit',array('id'=>$_REQUEST[id]))}" onsubmit="return validateCallback(this,dialogAjaxDone2);">
    	<div class="tabsContent">
            <div class="pageFormContent" layouth="220">
        		<dl>
        			<dt>模型类型：</dt>
        			<dd>
        			    <select name="info[mname]" id="mname" class="sel" >
                            <option value="sj">手机 </option>
                            <option value="pb">平板</option>
                            <option value="sjpj">手机配件</option>
                            <option value="sjsp">手机饰品</option>
                            <option value="sjlh">手机靓号</option>
                            <option value="hmpf">号码批发</option>
                        </select>
                    </dd>
        		</dl>
        		<dl>
                    <dt>结算比例：</dt>
                    <dd><input id="profit" name="info[profit]" type="text" value=""/></dd>
                </dl>
            </div>
    	</div>
    	<div class="formBar">
            <ul>
                <li><div class="buttonActive"><div class="buttonContent">
                    <input id="dosubmit" name="dosubmit" type="hidden" value="1"/>
                    <button type="submit">保存</button></div></div>
                </li>
                <li>
                    <div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
                </li>
            </ul>
        </div>
        <div class="tabsFooter">
            <div class="tabsFooterContent"></div>
        </div>
    </form>
</div>
<script>
    function dialogAjaxDone2(json){
    DWZ.ajaxDone(json);
    if (json.statusCode == DWZ.statusCode.ok){
        if (json.navTabId){
            navTab.reload(json.forwardUrl, {navTabId: json.navTabId});
        } else if (json.rel) {
            var $pagerForm = $("#pagerForm", navTab.getCurrentPanel());
            var args = $pagerForm.size()>0 ? $pagerForm.serializeArray() : {}
            navTabPageBreak(args, json.rel);
        }else if(json.dialogId){
            //$.pdialog.closeCurrent();
            $.pdialog.reload(json.forwardUrl,{dialogId:json.dialogId});
        }
        if ("closeCurrent" == json.callbackType) {
            if(json.forwardUrl){
                navTab.reload(json.forwardUrl);
            }
            $.pdialog.closeCurrent();
        }
    }
}
</script>